#ifndef __PRINTSYSLOG__
#define __PRINTSYSLOG__

#include <syslog.h>
#include <func.h>
#include "ds.h"

int printServerLogs(cmd_t *cmd);

#define PRINT_LOG(cmd) {                                                                 \
    FILE *pfile = fopen("/var/log/syslog", "a");                                         \
    fprintf(pfile, "line:%d, function:%s, file:%s\n", __LINE__, __FUNCTION__, __FILE__); \
    printServerLogs(cmd);                                                                \
    fclose(pfile);                                                                       \
}

#endif